package com.gee.spring.cloud.aerospace.simulate.mgt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gee.cloud.common.core.domain.entity.BaseEntity;
import com.gee.excel.core.annotation.ExcelColumn;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 遥测公式
 * </p>
 *
 * @author gee
 * @since 2024-07-10
 */
@Getter
@Setter
@TableName("gee_cloud_satellite_telemetry_dsl")
@Schema(description = "遥测公式")
public class SatelliteTelemetryDsl extends BaseEntity<SatelliteTelemetryDsl> {

    private static final long serialVersionUID = 1L;

    @Schema(description =  "id", required = true)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description =  "公式类型", required = true)
    @TableField(value = "dsl_type")
    @NotNull(message = "公式类型不能为空")
    @ExcelColumn(header = "公式类型")
    private String dslType;

    @Schema(description =  "公式名称", required = true)
    @TableField(value = "dsl_name")
    @NotNull(message = "公式名称不能为空")
    @ExcelColumn(header = "公式名称")
    private String dslName;

    @Schema(description =  "公式说明", required = true)
    @TableField(value = "dsl_desc")
    @NotNull(message = "公式说明不能为空")
    @ExcelColumn(header = "公式说明")
    private String dslDesc;

    @Schema(description =  "公式脚本", required = true)
    @TableField(value = "dsl_script")
    @NotNull(message = "公式脚本不能为空")
    @ExcelColumn(header = "公式脚本")
    private String dslScript;

    @Schema(description =  "脚本参数", required = true)
    @TableField(value = "dsl_script_param")
    @NotNull(message = "脚本参数不能为空")
    @ExcelColumn(header = "脚本参数")
    private String dslScriptParam;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
